﻿using Future.Common.Models;
using Future.Model.DtoModel;
using Future.Model.SysModel;
using Future.Model.ViewModel;

namespace Future.IBLL
{
    /// <summary>
    /// 用户业务接口类
    /// </summary>
    public interface IUserBLL
    {
        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="userDto"></param>
        /// <returns></returns>
        bool AddInfo(UserInfoDto userDto);

        /// <summary>
        /// 查询角色已授权用户分页列表
        /// </summary>
        /// <param name="userModel"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        PageModel<UserModel> AllocatedUserPageList(UserQueryDto userModel, PageParModel page);

        /// <summary>
        /// 获取用户已授权的角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        UserInfoDto AuthRole(Guid id);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool DeleteUserList(List<Guid> ids);

        /// <summary>
        /// 根据账号密码查询用户
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public UserModel GetUser(string userName, string password);

        /// <summary>
        /// 获取当前登录用户的信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public UserInfoVo GetUserAllInfo(Guid id);

        /// <summary>
        /// 通过id获取用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        UserInfoDto GetUserById(Guid id);

        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="id"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        bool RestPassword(Guid id, string password);

        /// <summary>
        /// 分页获取用户信息列表
        /// </summary>
        /// <param name="queryDto"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        PageModel<UserModel> SelctPageList(UserQueryDto queryDto, PageParModel page);

        /// <summary>
        /// 查询角色未授权用户列表
        /// </summary>
        /// <param name="userQueryDto"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        PageModel<UserModel> UnallocatedPageList(UserQueryDto userQueryDto, PageParModel page);

        /// <summary>
        /// 用户授权角色
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="roleIds"></param>
        /// <returns></returns>
        bool UpdateAuthRole(Guid userId, List<Guid> roleIds);

        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="userDto"></param>
        /// <returns></returns>
        bool UpdateInfo(UserInfoDto userDto);

        /// <summary>
        /// 用户更新密码
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userResetPwdDto"></param>
        /// <returns></returns>
        bool UpdatePassword(Guid id, UserResetPwdDto userResetPwdDto);

        /// <summary>
        /// 更改用户状态
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        bool UpdateStatus(Guid userId, bool status);

        /// <summary>
        /// 更新用户头像
        /// </summary>
        /// <param name="userModel"></param>
        /// <returns></returns>
        bool UpdateUserAvatar(UserModel userModel);

        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="userModel"></param>
        /// <returns></returns>
        bool UpdateUserProfile(UserModel userModel);
    }
}